package com.frxuexi.lib_base.http

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import com.bumptech.glide.request.RequestOptions

object GlideUtil {

    fun getImg(url:String,iv:ImageView){
        Glide.with(iv).load(url).into(iv)
    }

    fun getCircleImg(url:String,iv:ImageView){
        Glide.with(iv).load(url).circleCrop().into(iv)
    }

    fun getRoundImg(url:String,iv:ImageView){
        Glide.with(iv).load(url).apply(RequestOptions.bitmapTransform(RoundedCorners(20))).into(iv)
    }
}